package com.buba.commodity.controller;

import com.buba.commodity.pojo.ProductColor;
import com.buba.commodity.service.ColorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ColorController")
public class ColorController {
    private ColorService colorService;

    /**
     * 查询商品颜色方法
     * @return
     */
    @RequestMapping("/selColor")
    public List<ProductColor> selColor(){
        List<ProductColor> list = colorService.selColor();
        return list;
    }

    @Autowired
    @Qualifier("colorServiceImpl")
    public void setColorService(ColorService colorService) {
        this.colorService = colorService;
    }
}
